// To parse this JSON data, do
//
//     final voiceRecognitionResultData = voiceRecognitionResultDataFromJson(jsonString);

import 'dart:convert';

VoiceRecognitionResultData voiceRecognitionResultDataFromJson(String str) =>
    VoiceRecognitionResultData.fromJson(json.decode(str));

String voiceRecognitionResultDataToJson(VoiceRecognitionResultData data) => json.encode(data.toJson());

class VoiceRecognitionResultData {
  final OriginResultData? originResult;
  final List<String> resultsRecognition;

  const VoiceRecognitionResultData({
    this.originResult,
    this.resultsRecognition = const [],
  });

  factory VoiceRecognitionResultData.fromJson(Map json) => VoiceRecognitionResultData(
        resultsRecognition: json["results_recognition"] == null
            ? const []
            : List<String>.from(json["results_recognition"].map((x) => x)),
        originResult: json["origin_result"] == null ? null : OriginResultData.fromJson(json["origin_result"]),
      );

  Map<String, dynamic> toJson() => {
        "results_recognition": List<dynamic>.from(resultsRecognition.map((x) => x)),
        "origin_result": originResult?.toJson(),
      };
}

class OriginResultData {
  final int? errNo;
  final ResultData? result;
  final int? productId;
  final int? corpusNo;
  final String? sn;
  final String? resultType;
  final String? productLine;

  const OriginResultData({
    this.errNo,
    this.result,
    this.productId,
    this.corpusNo,
    this.sn,
    this.resultType,
    this.productLine,
  });

  factory OriginResultData.fromJson(Map<String, dynamic> json) => OriginResultData(
        errNo: json["err_no"],
        result: json["result"] == null ? null : ResultData.fromJson(json["result"]),
        productId: json["product_id"],
        corpusNo: json["corpus_no"],
        sn: json["sn"],
        resultType: json["result_type"],
        productLine: json["product_line"],
      );

  Map<String, dynamic> toJson() => {
        "err_no": errNo,
        "result": result?.toJson(),
        "product_id": productId,
        "corpus_no": corpusNo,
        "sn": sn,
        "result_type": resultType,
        "product_line": productLine,
      };
}

class ResultData {
  final List<int> confident;
  final List<String> word;

  const ResultData({
    this.confident = const [],
    this.word = const [],
  });

  factory ResultData.fromJson(Map<String, dynamic> json) => ResultData(
        confident: json["confident"] == null ? const [] : List<int>.from(json["confident"].map((x) => x)),
        word: json["word"] == null ? const [] : List<String>.from(json["word"].map((x) => x)),
      );

  Map<String, dynamic> toJson() => {
        "confident": List<dynamic>.from(confident.map((x) => x)),
        "word": List<dynamic>.from(word.map((x) => x)),
      };
}
